import React from "react"
import MyNav from './MyNav';
import StateComponent from './StateComponent';
import ComponentLife from './ComponentLife';
//用类的形式创建组件
export default class App extends React.Component{
    render(){
        const navList=["首页","学习","娱乐","考试"];
        const navList2=["web前端","spring boot","java"]
        return (
            <div>
                <h1>hello Component</h1>
                <h2>学习 心态要好</h2>
                <div>
                    <MyNav navList={navList} title="路径导航"/>
                    <MyNav navList={navList2} title="明细导航"/>
                    <StateComponent/>
                </div>
                <div>
                    <ComponentLife/>
                </div>
            </div>
            
            
        )
    }
}

